Wearable devices are portable devices which are worn directly by users or integrated into users' clothes or accessories. Wearable devices are capable of performing powerful functions through software support, data interaction and cloud interaction. Wearable devices will significantly change our life and perception of the world. Currently, when it is worn by a user, a wearable device may determine the user's sleep duration by collecting the user's moving states.